<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>05-抽离子组件</title>
    <script type="text/javascript" src="../VueJs/vue.js"></script>
    <script src="./components/School.js"></script>
    <script src="./components/Student.js"></script>
</head>
<body>
    <div id="demo"> </div>

    <script type="text/javascript">
        //阻止 vue 在启动时生成生产提示。
        Vue.config.productionTip = false

        const App = Vue.extend({
            components: {
                School,
                Student
            },
            template: `
                <div>
                    <h3> 在App中引入子组件 </h3>
                    ----------------------- <br /><br />
                    <School />
                    ----------------------- <br /><br />
                    <Student />
                </div>
            `
        })
    
        new Vue({
            el: '#demo',
            components: {
                App
            },
            template: `<App />`
        })
    </script>
</body>
</html>